In this recipe we do something a little more interesting with the onMouseOver() event and image arrays. Move the mouse cursor and try to "touch" the red ball with it.![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Discussion
Since image arrays allow you to dynamically re-assign the contents of an on-page graphic, you can use them to create games or other sorts of moving displays. Any event can be a reason to change a graphic:For this effect we combined an onClick() event with the JavaScript setTimeout() call to create an "animation" on the button.
This recipe was inspired by material provided by Doug Wilcox, WordSmith [WordSmth@ici.net], who also did much of our beta testing.
Copyright ©2000 by Charles River Media, All Rights Reserved